package cn.kgc.springcloud2038.alibaba.consumer.nacos.order83.controller;

import cn.kgc.springcloud2038.alibaba.consumer.nacos.order83.Service.PaymentServiceAli;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderNacosController {
    @Resource
    private PaymentServiceAli paymentServiceAli;
    @Value("${config.info}")
    String info;

    @GetMapping(value = "/payment/nacos/{id}")
    public String getPayment(@PathVariable("id") Integer id){
        return paymentServiceAli.getPayment(id);
    }
    @GetMapping(value = "/payment/info")
    public String getinfo(){
        return this.info;
    }
}
